//
//  MyApplyResultView.swift
//  LongTermInsurance
//
//  Created by zolobdz on 2019/1/9.
//  Copyright © 2019年 HeChao. All rights reserved.
//

import UIKit

class MyApplyResultView: UIView {
    
    lazy var fontSize: CGFloat = 13.0
    //申请单号
    lazy var applyNumStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "申请单号："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyNumDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //申请日期
    lazy var applyDateStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "申请日期："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyDateDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //申请人电话
    lazy var applyMobileStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "申请人电话："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyMobileDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //申请人居住地址
    lazy var applyAddressStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "申请人居住地址："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyAddressDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //监护人
    lazy var applyHelperStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "监护人："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyHelperDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //监护人电话
    lazy var applyHelperMobileStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "监护人电话："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyHelperMobileDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //评估日期
    lazy var applyResultDateStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "评估日期："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyResultDateDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    //评估结果
    lazy var applyResultInfoStaticLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.text = "评估结果："
        view.textColor = CDColor.grayTitleColorA
        return view
    }()
    
    lazy var applyResultInfoDetailLabel: UILabel = {
        let view = UILabel()
        view.font = UIFont.systemFont(ofSize: fontSize)
        view.numberOfLines = 2
        view.textColor = CDColor.grayTitleColorA
        view.text = ""
        return view
    }()
    
    init() {
        super.init(frame: CGRect.zero)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        let detailLeft = 120.0
        let verPadding = 15.0
        let leftGap = 20
        addSubview(applyNumStaticLabel)
        addSubview(applyNumDetailLabel)
        applyNumStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(15)
            make.left.equalTo(leftGap)
        }
        applyNumDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyNumStaticLabel)
            make.right.equalTo(-10)
        }
        addSubview(applyDateStaticLabel)
        addSubview(applyDateDetailLabel)
        applyDateStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyNumStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyDateDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyDateStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyMobileStaticLabel)
        addSubview(applyMobileDetailLabel)
        applyMobileStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyDateStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyMobileDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyMobileStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyAddressStaticLabel)
        addSubview(applyAddressDetailLabel)
        applyAddressStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyMobileStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyAddressDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyAddressStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyHelperStaticLabel)
        addSubview(applyHelperDetailLabel)
        applyHelperStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyAddressStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyHelperDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyHelperStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyHelperMobileStaticLabel)
        addSubview(applyHelperMobileDetailLabel)
        applyHelperMobileStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyHelperStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyHelperMobileDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyHelperMobileStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyResultDateStaticLabel)
        addSubview(applyResultDateDetailLabel)
        applyResultDateStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyHelperMobileStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyResultDateDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyResultDateStaticLabel)
            make.right.equalTo(-10)
        }
        
        addSubview(applyResultInfoStaticLabel)
        addSubview(applyResultInfoDetailLabel)
        
        applyResultInfoStaticLabel.snp.remakeConstraints { (make) in
            make.top.equalTo(applyResultDateStaticLabel.snp.bottom).offset(verPadding)
            make.left.equalTo(leftGap)
        }
        applyResultInfoDetailLabel.snp.remakeConstraints { (make) in
            make.left.equalTo(detailLeft)
            make.centerY.equalTo(applyResultInfoStaticLabel)
            make.right.equalTo(-10)
        }
        
    }
}
